package com.sm.honkon.ui.fragment.more

import android.os.Bundle
import com.sm.honkon.R
import com.sm.honkon.app.base.BaseFragment
import com.sm.honkon.app.ext.goBackHome
import com.sm.honkon.app.ext.goMannger
import com.sm.honkon.databinding.FrgChangjiashezhiBinding
import com.sm.honkon.ui.model.MainViewModel
import me.hgj.jetpackmvvm.ext.nav
import me.hgj.jetpackmvvm.ext.navigateAction

class ChangjiaShezhiFragment : BaseFragment<MainViewModel, FrgChangjiashezhiBinding>() {
    override fun layoutId(): Int = R.layout.frg_changjiashezhi

    override fun initView(savedInstanceState: Bundle?) {
        mDatabind.click = Click()
    }

    inner class Click{
        fun back(){
            nav().navigateUp()
        }
        fun home(){
            nav().goBackHome()
        }
        fun mannger(){

            nav().goMannger()
        }

        fun exit() {
            System.exit(0)
        }

        fun setting() {
        }

        fun benjixinxi() {
            nav().navigateAction(R.id.action_changjiaShezhiFragment_to_settingInfoFragment)
        }

        fun jiaozhunxishu() {
            nav().navigateAction(R.id.jiaozhunxishuFragment)
        }

        fun shebeijiaozhun() {
            nav().navigateAction(R.id.action_changjiaShezhiFragment_to_handheldFragment)
        }

        fun tongyong() {
            nav().navigateAction(R.id.action_changjiaShezhiFragment_to_commonConfigFragment)
        }

        fun weihu() {
            nav().navigateAction(R.id.action_changjiaShezhiFragment_to_maintainFragment)
        }
    }
}